﻿'*******************************************************************************************
'* Copyright Brügmann Software GmbH, Papenburg
'* Author: Björn Kremer
'* Contact: codeplex<at>patorg.de
'* 
'* VB.CMIS is a VB.NET implementation of the Content Management Interoperability Services (CMIS) standard
'*
'* This file is part of VB.CMIS.
'* 
'* VB.CMIS is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'* 
'* VB.CMIS is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'* GNU Lesser General Public License for more details.
'* 
'* You should have received a copy of the GNU Lesser General Public License
'* along with VB.CMIS. If not, see <http://www.gnu.org/licenses/>.
'*******************************************************************************************
Imports CMISObjectModel.TypeDefinitions
Imports CMISObjectModel.ServiceDocument
Imports CMISObjectModel.Enums
Imports CMISObjectModel.CMISObjects
Imports CMISObjectModel.Atom

'*******************************************************************************************
'* Copyright Brügmann Software GmbH, Papenburg
'* Author: Björn Kremer
'* Contact: codeplex<at>patorg.de
'* 
'* VB.CMIS is a VB.NET implementation of the Content Management Interoperability Services (CMIS) standard
'*
'* This file is part of VB.CMIS.
'* 
'* VB.CMIS is free software: you can redistribute it and/or modify
'* it under the terms of the GNU Lesser General Public License as published by
'* the Free Software Foundation, either version 3 of the License, or
'* (at your option) any later version.
'* 
'* VB.CMIS is distributed in the hope that it will be useful,
'* but WITHOUT ANY WARRANTY; without even the implied warranty of
'* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'* GNU Lesser General Public License for more details.
'* 
'* You should have received a copy of the GNU Lesser General Public License
'* along with VB.CMIS. If not, see <http://www.gnu.org/licenses/>.
'*******************************************************************************************
Public Interface IProvider

   Function IsUserValid(username As String, password As String) As Boolean

   Sub Init(username As String)

   Function GetTypeDefinition(repositoryId As String, id As String) As CMISAtomEntryTypeDefinition

   Function GetRepositories() As List(Of RepositoryInfo)

   Function GetRepository(repositoryId As String) As RepositoryInfo

   Function GetChildren(repositoryId As String, id As String, maxItems As Integer?, skipCount As Integer?, orderBy As String, filter As String, includeRelationships As IncludeRelationships?, renditionFilter As String, includeAllowableActions As Boolean?, includePathSegment As Boolean?) As CMISAtomFeed(Of CmisObject)

   Function GetAllowableActions(repositoryId As String, id As String) As AllowableActions

   Function GetObject(repositoryId As String, id As String, pPwc As Boolean?, returnVersion As ReturnVersionEnum?, filter As String, includeAllowableActions As Boolean?, includeRelationships As IncludeRelationships?, renditionFilter As String, includePolicyIds As Boolean?, includeAcl As Boolean?) As CMISAtomEntryCmisObject

   Function GetTypeChildren(repositoryId As String, id As String, includePropertyDefinitions As Boolean?, maxItems As Integer?, skipCount As Integer?) As CMISAtomFeed(Of TypeDefinition)

   Function GetACL(repositoryId As String, id As String) As Acl

   Function GetAppliedPolicies(repositoryId As String, id As String, filter As String) As CMISAtomFeed(Of CmisObject)

   Function GetContentStream(repositoryId As String, id As String, streamId As String) As ContentStreamWrapper

   Function GetDescendants(repositoryId As String, id As String, filter As String, depth As Integer?, includeAllowableActions As Boolean?, includeRelationships As IncludeRelationships?, renditionFilter As String, includePathSegment As Boolean?) As CMISAtomFeed(Of CmisObject)

   Function GetFolderTree(repositoryId As String, id As String, filter As String, depth As Integer?, includeAllowableActions As Boolean?, includeRelationships As IncludeRelationships?, renditionFilter As String) As CMISAtomFeed(Of CmisObject)

   Function GetTypeDescendants(repositoryId As String, id As String, includePropertyDefinitions As Boolean?, depth As Integer?) As CMISAtomFeed(Of TypeDefinition)

   Function GetObjectRelationships(repositoryId As String, id As String, typeId As String, includeSubRelationshipTypes As Boolean?, relationshipDirection As RelationshipDirectionEnum?, maxItems As Integer?, skipCount As Integer?, filter As String, includeAllowableActions As Boolean?) As CMISAtomFeed(Of CmisObject)

   Function GetAllVersions(repositoryId As String, id As String, filter As String, includeAllowableActions As Boolean?) As CMISAtomFeed(Of CmisObject)

   Function GetCheckedOutDocs(repositoryId As String, id As String, filter As String, maxItems As Integer?, skipCount As Integer?, renditionFilter As String, includeAllowableActions As Boolean?, includeRelationships As IncludeRelationships?) As CMISAtomFeed(Of CmisObject)

   Function GetObjectByPath(repositoryId As String, path As String, filter As String, includeAllowableActions As Boolean?, includeRelationships As IncludeRelationships?, renditionFilter As String, includePolicyIds As Boolean?, includeACL As Boolean?) As CMISAtomEntryCmisObject

   Function GetObjectParents(repositoryId As String, id As String, filter As String, includeRelationships As IncludeRelationships?, renditionFilter As String, includeAllowableActions As Boolean?, includeRelativePathSegment As Boolean?) As CMISAtomFeed(Of CmisObject)

   Function Query(repositoryId As String, rawData As Xml.XmlDocument, parsedData As Query) As CMISAtomFeed(Of CmisObject)

   Function Query(repositoryId As String, q As String, searchAllVersions As Boolean?, maxItems As Integer?, skipCount As Integer?, includeAllowableActions As Boolean?, includeRelationships As IncludeRelationships?) As CMISAtomFeed(Of CmisObject)

   Function GetContentChanges(repositoryId As String, filter As String, maxItems As Integer?, includeACL As Boolean?, includePolicyIds As Boolean?, includeProperties As Boolean?, changeLogToken As String) As CMISAtomFeed(Of CmisObject)

   Function CreateOrMoveObject(repositoryId As String, id As String, sourceFolderId As String, versioningState As VersioningStateEnum?, rawData As Xml.XmlDocument, parsedData As CMISReceiptObject) As CMISAtomEntryCmisObject

   Sub DeleteObject(repositoryId As String, id As String, allVersions As Boolean?)

   Function UpdateProperties(repositoryId As String, id As String, major As Boolean?, checkIn As Boolean?, checkinComment As String, rawData As Xml.XmlDocument, parseData As CMISObjects.CMISReceiptObject) As CMISAtomEntryCmisObject

   Function SetContentStream(repositoryId As String, id As String, overwriteFlag As Boolean?, data As IO.Stream) As SetContentStreamResultEnum

   Sub DeleteContentStream(repositoryId As String, id As String)

   Function RemoveObjectFromFolder(repositoryId As String, removeFrom As String, rawData As Xml.XmlDocument, parsedData As CMISReceiptObject) As CMISAtomEntryCmisObject

   Function DeleteTree(repositoryId As String, id As String, allVersions As Boolean?, continueOnFailure As Boolean?, unfileObjects As UnfileObjectsEnum?) As DeleteTreeResultEnum

   Function CreateRelationship(repositoryId As String, id As String, rawData As Xml.XmlDocument, parsedData As CMISReceiptObject) As CMISAtomEntryCmisObject

   Function CheckOut(repositoryId As String, rawData As Xml.XmlDocument, parsedData As CMISReceiptObject) As CMISAtomEntryCmisObject

   Function ApplyACL(repositoryId As String, id As String, aclPropagation As ACLPropagationEnum?, rawData As Xml.XmlDocument, parsedData As Acl) As Acl

   Function ApplyPolicy(repositoryId As String, id As String, rawData As Xml.XmlDocument, parsedData As CMISReceiptObject) As CMISAtomEntryCmisObject

   Sub RemovePolicy(repositoryId As String, id As String)

   Function GetTypeParentId(repositoryId As String, id As String) As String

   Function GetUnfiled(repositoryId As String) As CMISAtomFeed(Of CmisObject)

End Interface